hysop.backend.device.opencl.operator.transpose module¶
- class hysop.backend.device.opencl.operator.transpose.OpenClTranspose(input_field, output_field, variables, axes, name=None, pretty_name=None, **kwds)[source]¶
Bases:
TransposeOperatorBase
,OpenClOperator
Initialize a transposition operator operating on CartesianTopologyDescriptors.
- input_field: ScalarField
Input continuous scalar field to be transposed, at least 2D.
- output_field: ScalarField
Output continuous scalar field where the result is stored Transposed shape should match the input. output_field can be the same as input_field resulting in an inplace transposition.
- variables: dict
Dictionary of fields as keys and CartesianTopologyDescriptors as values. Should contain input and output field.
- axes: tuple or list of ints
Permutation of axes in numpy notations Axe dim-1 is the contiguous axe, axe 0 has the greatest stride in memory.
- kwds: dict
Base class keyword arguments.
- apply(**kwds)¶
Abstract method that should be implemented. Applies this node (operator, computational graph operator…).
- setup(work)[source]¶
Setup temporary buffer that have been requested in get_work_properties(). This function may be used to execute post allocation routines. This sets self.ready flag to True. Once this flag is set one may call ComputationalGraphNode.apply() and ComputationalGraphNode.finalize().
Automatically honour temporary field memory requests.